import { IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';

import render from '@feidao/web/atom/nodejs/render/render';

////////////////////////////////////////////////////////////////////////////////
// import presentations
import nodejs from '@feidao/web/atom/nodejs/msg/nodejs';
import p001 from './p001';
import get_lang from '../../atom-web/get-lang';
////////////////////////////////////////////////////////////////////////////////

export default async function nba001(fd: IFeidaoAiNodejsComponent, ...args: any[]) {
	const lang = get_lang(fd);
	const { actionid, sessionid, spaceid } = fd.data.headers;
	const result = await nodejs<string>(actionid, sessionid, spaceid, `web/page/s001`, { lang, param: 'abc' });
	window.console.info('nnnnnnnnnnnn', result);
	const data = 100;
	render(fd.data.node, data, p001(fd), 'p001');
}
